//
//  GJFPlotModel.m
//  Wedding
//
//  Created by 郭静芬 on 2016/12/21.
//  Copyright © 2016年 郭静芬. All rights reserved.
//

#import "GJFPlotModel.h"

@implementation GJFPlotModel
+ (NSDictionary *)mj_objectClassInArray {
    return @{@"list": [GJFImageModel class]};
}

- (NSNumber *)heightForCell {
    if ([_heightForCell intValue] != 0) {
        if (self.describe.length > 0) {
            NSInteger hei = [_heightForCell intValue];
            NSInteger hie = [GJFSingleTool heightWithText:self.describe fontSize:14 Width:WIDTH - 20];
            if ((hei - 40) % 25 == 0) {
                _heightForCell = [NSNumber numberWithInteger:hei + hie];
            }
        }
    }
    return _heightForCell;
}

- (void)setShare_icon:(NSString *)share_icon {
    _share_icon = share_icon;
    [self share_icon_res];
}

- (UIImage *)share_icon_res {
    if (!_share_icon_res) {
        UIImageView *image = [UIImageView new];
        [image sd_setImageWithURL:[NSURL URLWithString:self.share_icon] completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
            _share_icon_res = image;
        }];
    }
    return _share_icon_res;
}

@end
@implementation GJFImageModel

@end
